package cn.wolfcode.trip.base.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;
@Getter
@Setter
public class MyOrder extends BaseDomain{
    public static final Integer STATE_NORMAL=0;//待付款
    public static final Integer STATE_COMMEND=1;//已付款

    //商城商品
    private Product product;
    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GTM+8")
    private Date createTime;
    //客户
    private User user;
    //支付状态
    private Integer state;
    //尺寸
    private Long size;
    //颜色
    private String color;
    //数量
    private Long number;

    public String getStateName(){
        String temp="";
        if (state==STATE_NORMAL){
            temp="待付款";
        }else if (state==STATE_COMMEND){
            temp="已付款";
        }
        return temp;
    }

}